import * as actionTypes from '@/store/action/actionTypes'
const counterReducer=(state={count:10},action)=>{
    switch(action.type){
        case actionTypes.ADDITAION:
            return {...state,count:state.count+action.num}
        case actionTypes.SUBTRACTION:
            return {...state,count:state.count-action.num}
        default:
            return state
    }
}
export default counterReducer